Repository navigation
Conversation
| "/v3/api-docs/**"}) List<String> excludedPaths){ | ||
|
|
||
| /// Validates startup policy and takes an immutable copy of the exclusion paths. | ||
| public HttpMessageSignatureProperties { |
Code coverage overviewLanguages: Java Java / code-coverage/jacoco
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Signature verification rejects valid CORS preflights with 401, preventing allowed origins from sending signed requests, and path-only exclusions cannot resolve this without also bypassing endpoint protection.
1 open issue
What changed in this PR
This PR adds shared-secret HTTP signature verification ahead of IDP-Core’s existing API and webhook authentication.
Changes:
- Adds signature parsing, HMAC verification, validity checks, exclusions, and standardized rejection responses.
- Integrates verification into all security chains, enabled by default with local, test, and CI opt-outs.
- Documents the signing contract and adds unit and integration coverage.
| File | Description |
|---|---|
src/test/resources/application-test.yml |
Disables verification by default in tests. |
src/test/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/security/chains/PublicFilterChainConfigTest.java |
Supplies the shared signature configurer. |
src/test/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/security/chains/OAuth2LoginFilterChainConfigTest.java |
Updates OAuth2 chain setup. |
src/test/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/security/chains/MockFilterChainConfigTest.java |
Updates mock chain setup. |
src/test/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/security/chains/JwtFilterChainConfigTest.java |
Updates JWT chain setup. |
src/test/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/security/chains/ApiKeyFilterChainConfigTest.java |
Updates API-key chain setup. |
src/test/java/com/decathlon/idp_core/infrastructure/adapters/api/auth/http_message_signature/HttpMessageSignatureVerifierTest.java |
Tests algorithms, timestamps, parsing, and tampering. |
src/test/java/com/decathlon/idp_core/infrastructure/adapters/api/auth/http_message_signature/HttpMessageSignatureIntegrationTest.java |
Tests HTTP enforcement and webhook compatibility. |
src/test/java/com/decathlon/idp_core/infrastructure/adapters/api/auth/http_message_signature/HttpMessageSignatureFilterTest.java |
Tests exclusions, rejection responses, and payload preservation. |
src/test/java/com/decathlon/idp_core/infrastructure/adapters/api/auth/http_message_signature/HttpMessageSignatureConfigurationTest.java |
Tests configuration validation and filter wiring. |
src/main/resources/application.yml |
Defines environment-backed signature settings. |
src/main/resources/application-local.yml |
Defaults local verification to disabled. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/ingestion/configuration/IngestionSecurityConfiguration.java |
Applies verification to webhook ingestion. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/security/chains/PublicFilterChainConfig.java |
Applies verification to public routes. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/security/chains/OAuth2LoginFilterChainConfig.java |
Applies verification to OAuth2 login. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/security/chains/MockFilterChainConfig.java |
Applies verification to mock authentication. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/security/chains/JwtFilterChainConfig.java |
Applies verification to JWT authentication. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/security/chains/ApiKeyFilterChainConfig.java |
Applies verification to the API-key chain. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/HttpMessageSignatureProperties.java |
Defines and validates signature policy. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/HttpMessageSignatureConfiguration.java |
Creates and positions the optional verification filter. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/configuration/HttpMessageSignatureAlgorithm.java |
Defines supported HMAC algorithms. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/auth/http_message_signature/HttpMessageSignatureVerifier.java |
Validates signature bytes and validity windows. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/auth/http_message_signature/HttpMessageSignatureResult.java |
Defines verification outcomes and error descriptions. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/auth/http_message_signature/HttpMessageSignatureParser.java |
Parses the restricted legacy signature format. |
src/main/java/com/decathlon/idp_core/infrastructure/adapters/api/auth/http_message_signature/HttpMessageSignatureFilter.java |
Enforces signatures and writes rejection responses. |
docs/src/deployment/configuration.md |
Documents deployment settings and defaults. |
docs/src/concepts/authentication.md |
Explains signing, exclusions, errors, and limitations. |
.github/workflows/basic_code_checks.yml |
Disables verification during Swagger validation. |
Review effort: Balanced
evebrnd
marked this pull request as ready for review
November 9, 2026 10:10
brandPittCode
requested changes
Nov 12, 2026
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




PR Description
What this PR Provides
Signatureheader with HMAC-SHA256, SHA1, SHA384, or SHA512.app.security.http-message-signature.Review
The reviewer must double-check these points:
How to test
Initial state
Enable
HTTP_MESSAGE_SIGNATURE_ENABLEDand provideHTTP_MESSAGE_SIGNATURE_SECRET, then restart the application. The default signed identifier header isx-request-id.Steps and expected results
Breaking changes
Context of the Breaking Change
HTTP message signature verification adds a security check before existing authentication.
Result of the Breaking Change
Deployments must configure signing clients and a shared secret before enabling this feature, or explicitly disable verification during rollout.